home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 02 - 1986 / 02.08 Aug 86.sit / 02.08 Aug 86 / c / menu.c < prev    next >
MacBinary  |  1986-06-30  |  6.8 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Jun 30 19:47:19 1986, modified Mon Jun 30 19:47:19 1986, creator Think C, type ASCII, 6333 bytes "menu.c" , at 0x193d 348 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-4K) default (weak)
16% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 6d 65 6e 75 2e 63 | 00 00 00 00 00 00 00 00 |..menu.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 18 bd 00 | 00 01 5c 9b 2c cb 07 9b |........|..\.,...|
|00000060| 2c cb 07 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |,.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 e7 d2 00 00 |........|........|
|00000080| 2f 2a 20 6d 65 6e 75 20 | 61 6e 64 20 77 69 6e 64 |/* menu |and wind|
|00000090| 6f 77 20 6d 61 6e 61 67 | 65 72 20 64 65 6d 6f 6e |ow manag|er demon|
|000000a0| 73 74 72 61 74 69 6f 6e | 20 0d 20 2a 20 62 61 73 |stration| . * bas|
|000000b0| 65 20 6f 6e 20 70 72 6f | 67 72 61 6d 20 69 6e 20 |e on pro|gram in |
|000000c0| 0d 20 2a 20 55 73 69 6e | 67 20 4d 61 63 69 6e 74 |. * Usin|g Macint|
|000000d0| 6f 73 68 20 54 6f 6f 6c | 62 6f 78 20 77 69 74 68 |osh Tool|box with|
|000000e0| 20 43 0d 20 2a 20 70 61 | 67 65 20 39 31 0d 20 2a | C. * pa|ge 91. *|
|000000f0| 0d 20 2a 09 43 6f 6d 70 | 69 6c 65 64 20 77 69 74 |. *.Comp|iled wit|
|00000100| 68 20 4c 69 67 68 74 73 | 70 65 65 64 43 0d 20 2a |h Lights|peedC. *|
|00000110| 0d 20 2a 09 49 6d 70 6f | 72 74 61 6e 74 20 6e 6f |. *.Impo|rtant no|
|00000120| 74 65 20 66 6f 72 20 4d | 61 63 20 43 20 75 73 65 |te for M|ac C use|
|00000130| 72 73 3a 0d 20 2a 09 09 | 45 76 65 72 79 70 6c 61 |rs:. *..|Everypla|
|00000140| 63 65 20 79 6f 75 20 73 | 65 65 20 65 76 65 6e 74 |ce you s|ee event|
|00000150| 2d 3e 77 68 65 72 65 2c | 0d 20 2a 09 09 72 65 70 |->where,|. *..rep|
|00000160| 6c 61 63 65 20 69 74 20 | 77 69 74 68 20 26 65 76 |lace it |with &ev|
|00000170| 65 6e 74 2d 3e 77 68 65 | 72 65 0d 20 2a 2f 0d 20 |ent->whe|re. */. |
|00000180| 0d 20 0d 20 23 69 6e 63 | 6c 75 64 65 09 22 61 62 |. . #inc|lude."ab|
|00000190| 63 2e 68 22 0d 20 23 69 | 6e 63 6c 75 64 65 09 22 |c.h". #i|nclude."|
|000001a0| 45 76 65 6e 74 73 2e 68 | 22 0d 20 23 69 6e 63 6c |Events.h|". #incl|
|000001b0| 75 64 65 09 22 57 69 6e | 64 6f 77 2e 68 22 0d 20 |ude."Win|dow.h". |
|000001c0| 23 69 6e 63 6c 75 64 65 | 09 22 4d 65 6e 75 2e 68 |#include|."Menu.h|
|000001d0| 22 0d 20 0d 20 2f 2a 20 | 64 65 66 69 6e 65 73 20 |". . /* |defines |
|000001e0| 66 6f 72 20 6d 65 6e 75 | 20 49 44 27 73 20 2a 2f |for menu| ID's */|
|000001f0| 0d 20 0d 20 23 64 65 66 | 69 6e 65 09 09 4d 64 65 |. . #def|ine..Mde|
|00000200| 73 6b 09 09 31 30 30 0d | 20 23 64 65 66 69 6e 65 |sk..100.| #define|
|00000210| 09 09 4d 66 69 6c 65 09 | 09 31 30 31 0d 20 23 64 |..Mfile.|.101. #d|
|00000220| 65 66 69 6e 65 09 09 4d | 65 64 69 74 09 09 31 30 |efine..M|edit..10|
|00000230| 32 0d 20 23 64 65 66 69 | 6e 65 09 09 4d 77 69 6e |2. #defi|ne..Mwin|
|00000240| 64 09 09 31 30 33 0d 20 | 23 64 65 66 69 6e 65 09 |d..103. |#define.|
|00000250| 09 4d 74 65 73 74 09 09 | 31 30 34 0d 20 0d 20 2f |.Mtest..|104. . /|
|00000260| 2a 20 47 6c 6f 62 61 6c | 20 76 61 72 69 61 62 6c |* Global| variabl|
|00000270| 65 73 20 2a 2f 0d 20 0d | 20 4d 65 6e 75 48 61 6e |es */. .| MenuHan|
|00000280| 64 6c 65 09 09 6d 65 6e | 75 44 65 73 6b 3b 09 2f |dle..men|uDesk;./|
|00000290| 2a 20 6d 65 6e 75 20 68 | 61 6e 64 6c 65 73 20 2a |* menu h|andles *|
|000002a0| 2f 0d 20 4d 65 6e 75 48 | 61 6e 64 6c 65 09 09 6d |/. MenuH|andle..m|
|000002b0| 65 6e 75 46 69 6c 65 3b | 0d 20 4d 65 6e 75 48 61 |enuFile;|. MenuHa|
|000002c0| 6e 64 6c 65 09 09 6d 65 | 6e 75 45 64 69 74 3b 0d |ndle..me|nuEdit;.|
|000002d0| 20 4d 65 6e 75 48 61 6e | 64 6c 65 09 09 6d 65 6e | MenuHan|dle..men|
|000002e0| 75 57 69 6e 64 3b 0d 20 | 4d 65 6e 75 48 61 6e 64 |uWind;. |MenuHand|
|000002f0| 6c 65 09 09 6d 65 6e 75 | 54 65 73 74 3b 0d 20 0d |le..menu|Test;. .|
|00000300| 20 0d 20 57 69 6e 64 6f | 77 50 74 72 09 09 74 68 | . Windo|wPtr..th|
|00000310| 65 57 69 6e 64 6f 77 3b | 0d 20 57 69 6e 64 6f 77 |eWindow;|. Window|
|00000320| 52 65 63 6f 72 64 09 77 | 69 6e 64 6f 77 52 65 63 |Record.w|indowRec|
|00000330| 3b 0d 20 52 65 63 74 09 | 09 09 09 64 72 61 67 62 |;. Rect.|...dragb|
|00000340| 6f 75 6e 64 3b 0d 20 52 | 65 63 74 09 09 09 09 6c |ound;. R|ect....l|
|00000350| 69 6d 69 74 52 65 63 74 | 3b 0d 20 0d 6d 61 69 6e |imitRect|;. .main|
|00000360| 28 29 0d 7b 0d 09 69 6e | 69 74 73 79 73 28 29 3b |().{..in|itsys();|
|00000370| 09 2f 2a 20 73 79 73 74 | 65 6d 20 69 6e 69 74 69 |./* syst|em initi|
|00000380| 61 6c 69 7a 61 74 69 6f | 6e 20 2a 2f 0d 09 69 6e |alizatio|n */..in|
|00000390| 69 74 61 70 70 28 29 3b | 09 2f 2a 20 61 70 70 6c |itapp();|./* appl|
|000003a0| 69 63 61 74 69 6f 6e 20 | 69 6e 69 74 69 61 6c 69 |ication |initiali|
|000003b0| 7a 61 74 69 6f 6e 20 2a | 2f 0d 09 65 76 65 6e 74 |zation *|/..event|
|000003c0| 6c 6f 6f 70 28 29 3b 0d | 7d 0d 0d 0d 2f 2a 20 73 |loop();.|}.../* s|
|000003d0| 79 73 74 65 6d 20 69 6e | 69 74 69 61 6c 69 7a 61 |ystem in|itializa|
|000003e0| 74 69 6f 6e 20 0d 20 2a | 09 09 6e 6f 74 65 20 75 |tion . *|..note u|
|000003f0| 73 65 20 6f 66 20 68 61 | 72 64 20 63 6f 64 65 64 |se of ha|rd coded|
|00000400| 20 73 63 72 65 65 6e 20 | 73 69 7a 65 73 0d 20 2a | screen |sizes. *|
|00000410| 09 09 77 69 74 68 20 4c | 69 67 68 74 73 70 65 65 |..with L|ightspee|
|00000420| 64 43 2e 20 20 54 68 69 | 73 20 77 69 6c 6c 20 77 |dC. Thi|s will w|
|00000430| 6f 72 6b 0d 20 2a 09 09 | 77 69 74 68 20 6f 74 68 |ork. *..|with oth|
|00000440| 65 72 20 63 6f 6d 70 69 | 6c 65 72 73 20 62 75 74 |er compi|lers but|
|00000450| 20 69 73 20 6e 6f 74 0d | 20 2a 09 09 67 6f 6f 64 | is not.| *..good|
|00000460| 20 70 72 61 63 74 69 63 | 65 0d 20 2a 2f 0d 69 6e | practic|e. */.in|
|00000470| 69 74 73 79 73 28 29 09 | 09 0d 7b 09 09 09 09 09 |itsys().|..{.....|
|00000480| 0d 09 49 6e 69 74 47 72 | 61 66 28 26 74 68 65 50 |..InitGr|af(&theP|
|00000490| 6f 72 74 29 3b 09 2f 2a | 20 74 68 65 73 65 20 74 |ort);./*| these t|
|000004a0| 77 6f 20 6c 69 6e 65 73 | 20 64 6f 6e 65 20 2a 2f |wo lines| done */|
|000004b0| 0d 09 49 6e 69 74 46 6f | 6e 74 73 28 29 3b 09 09 |..InitFo|nts();..|
|000004c0| 09 2f 2a 20 61 75 74 6f | 6d 61 74 69 63 61 6c 6c |./* auto|maticall|
|000004d0| 79 20 62 79 20 4d 61 63 | 20 43 20 2a 2f 0d 09 49 |y by Mac| C */..I|
|000004e0| 6e 69 74 57 69 6e 64 6f | 77 73 28 29 3b 0d 09 49 |nitWindo|ws();..I|
|000004f0| 6e 69 74 43 75 72 73 6f | 72 28 29 3b 0d 09 49 6e |nitCurso|r();..In|
|00000500| 69 74 4d 65 6e 75 73 28 | 29 3b 0d 09 74 68 65 57 |itMenus(|);..theW|
|00000510| 69 6e 64 6f 77 20 3d 20 | 4e 69 6c 3b 09 09 2f 2a |indow = |Nil;../*|
|00000520| 69 6e 64 69 63 61 74 65 | 73 20 6e 6f 20 77 69 6e |indicate|s no win|
|00000530| 64 6f 77 20 2a 2f 0d 09 | 53 65 74 52 65 63 74 28 |dow */..|SetRect(|
|00000540| 26 64 72 61 67 62 6f 75 | 6e 64 2c 30 2c 30 2c 35 |&dragbou|nd,0,0,5|
|00000550| 31 32 2c 33 34 32 29 3b | 0d 09 53 65 74 52 65 63 |12,342);|..SetRec|
|00000560| 74 28 26 6c 69 6d 69 74 | 52 65 63 74 2c 36 30 2c |t(&limit|Rect,60,|
|00000570| 34 30 2c 35 30 38 2c 33 | 31 38 29 3b 0d 7d 0d 0d |40,508,3|18);.}..|
|00000580| 0d 2f 2a 0d 20 2a 09 61 | 70 70 6c 69 63 61 74 69 |./*. *.a|pplicati|
|00000590| 6f 6e 20 69 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f |on initi|alizatio|
|000005a0| 6e 0d 20 2a 09 09 53 65 | 74 73 20 75 70 20 6d 65 |n. *..Se|ts up me|
|000005b0| 6e 75 73 2e 0d 20 2a 09 | 09 45 61 63 68 20 6d 65 |nus.. *.|.Each me|
|000005c0| 6e 75 20 69 73 20 61 20 | 73 65 70 61 72 61 74 65 |nu is a |separate|
|000005d0| 20 67 72 6f 75 70 0d 20 | 2a 09 09 6f 66 20 6c 69 | group. |*..of li|
|000005e0| 6e 65 73 2e 20 20 4e 6f | 74 65 20 74 68 65 20 6c |nes. No|te the l|
|000005f0| 61 73 74 20 6d 65 6e 75 | 0d 20 2a 09 09 69 73 20 |ast menu|. *..is |
|00000600| 61 70 70 65 6e 64 65 64 | 20 62 75 74 20 6e 6f 74 |appended| but not|
|00000610| 20 69 6e 73 65 72 74 65 | 64 2e 20 20 54 68 69 73 | inserte|d. This|
|00000620| 0d 20 2a 09 09 6d 61 6b | 65 73 20 69 74 20 70 61 |. *..mak|es it pa|
|00000630| 72 74 20 6f 66 20 74 68 | 65 20 6d 65 6e 75 20 6c |rt of th|e menu l|
|00000640| 69 73 74 20 62 75 74 20 | 0d 20 2a 09 09 6e 6f 74 |ist but |. *..not|
|00000650| 20 69 6e 20 74 68 65 20 | 6d 65 6e 75 20 62 61 72 | in the |menu bar|
|00000660| 2e 0d 20 2a 2f 0d 69 6e | 69 74 61 70 70 28 29 0d |.. */.in|itapp().|
|00000670| 7b 0d 09 6d 65 6e 75 44 | 65 73 6b 20 3d 20 4e 65 |{..menuD|esk = Ne|
|00000680| 77 4d 65 6e 75 28 4d 64 | 65 73 6b 2c 43 74 6f 50 |wMenu(Md|esk,CtoP|
|00000690| 73 74 72 28 22 5c 32 34 | 22 29 29 3b 0d 09 41 64 |str("\24|"));..Ad|
|000006a0| 64 52 65 73 4d 65 6e 75 | 20 28 6d 65 6e 75 44 65 |dResMenu| (menuDe|
|000006b0| 73 6b 2c 20 27 44 52 56 | 52 27 29 3b 0d 09 49 6e |sk, 'DRV|R');..In|
|000006c0| 73 65 72 74 4d 65 6e 75 | 20 28 6d 65 6e 75 44 65 |sertMenu| (menuDe|
|000006d0| 73 6b 2c 20 30 29 3b 0d | 09 0d 09 6d 65 6e 75 46 |sk, 0);.|...menuF|
|000006e0| 69 6c 65 20 3d 20 4e 65 | 77 4d 65 6e 75 28 4d 66 |ile = Ne|wMenu(Mf|
|000006f0| 69 6c 65 2c 20 43 74 6f | 50 73 74 72 28 22 46 69 |ile, Cto|Pstr("Fi|
|00000700| 6c 65 22 29 29 3b 0d 09 | 41 70 70 65 6e 64 4d 65 |le"));..|AppendMe|
|00000710| 6e 75 20 28 6d 65 6e 75 | 46 69 6c 65 2c 20 0d 09 |nu (menu|File, ..|
|00000720| 09 43 74 6f 50 73 74 72 | 28 22 4f 70 65 6e 20 57 |.CtoPstr|("Open W|
|00000730| 69 6e 64 6f 77 2f 4d 3b | 43 6c 6f 73 65 20 57 69 |indow/M;|Close Wi|
|00000740| 6e 64 6f 77 2f 58 3b 51 | 75 69 74 2f 51 22 29 29 |ndow/X;Q|uit/Q"))|
|00000750| 3b 0d 09 41 70 70 65 6e | 64 4d 65 6e 75 20 28 6d |;..Appen|dMenu (m|
|00000760| 65 6e 75 46 69 6c 65 2c | 20 0d 09 09 43 74 6f 50 |enuFile,| ...CtoP|
|00000770| 73 74 72 28 22 28 2d 3b | 53 68 6f 77 20 54 65 73 |str("(-;|Show Tes|
|00000780| 74 3b 28 48 69 64 65 20 | 54 65 73 74 22 29 29 3b |t;(Hide |Test"));|
|00000790| 0d 09 49 6e 73 65 72 74 | 4d 65 6e 75 20 28 6d 65 |..Insert|Menu (me|
|000007a0| 6e 75 46 69 6c 65 2c 20 | 30 29 3b 0d 09 0d 09 6d |nuFile, |0);....m|
|000007b0| 65 6e 75 45 64 69 74 20 | 3d 20 4e 65 77 4d 65 6e |enuEdit |= NewMen|
|000007c0| 75 28 4d 65 64 69 74 2c | 20 43 74 6f 50 73 74 72 |u(Medit,| CtoPstr|
|000007d0| 28 22 45 64 69 74 22 29 | 29 3b 0d 09 41 70 70 65 |("Edit")|);..Appe|
|000007e0| 6e 64 4d 65 6e 75 20 28 | 6d 65 6e 75 45 64 69 74 |ndMenu (|menuEdit|
|000007f0| 2c 20 0d 09 09 43 74 6f | 50 73 74 72 28 22 55 6e |, ...Cto|Pstr("Un|
|00000800| 64 6f 3b 28 2d 3b 43 75 | 74 3b 43 6f 70 79 3b 50 |do;(-;Cu|t;Copy;P|
|00000810| 61 73 74 65 3b 43 6c 65 | 61 72 22 29 29 3b 0d 09 |aste;Cle|ar"));..|
|00000820| 49 6e 73 65 72 74 4d 65 | 6e 75 20 28 6d 65 6e 75 |InsertMe|nu (menu|
|00000830| 45 64 69 74 2c 20 30 29 | 3b 0d 09 0d 09 6d 65 6e |Edit, 0)|;....men|
|00000840| 75 57 69 6e 64 20 3d 20 | 4e 65 77 4d 65 6e 75 28 |uWind = |NewMenu(|
|00000850| 4d 77 69 6e 64 2c 20 43 | 74 6f 50 73 74 72 28 22 |Mwind, C|toPstr("|
|00000860| 57 69 6e 64 6f 77 22 29 | 29 3b 0d 09 41 70 70 65 |Window")|);..Appe|
|00000870| 6e 64 4d 65 6e 75 20 28 | 6d 65 6e 75 57 69 6e 64 |ndMenu (|menuWind|
|00000880| 2c 20 0d 09 09 43 74 6f | 50 73 74 72 28 22 48 69 |, ...Cto|Pstr("Hi|
|00000890| 64 65 3b 53 68 6f 77 3b | 4e 65 77 20 54 69 74 6c |de;Show;|New Titl|
|000008a0| 65 22 29 29 3b 0d 09 49 | 6e 73 65 72 74 4d 65 6e |e"));..I|nsertMen|
|000008b0| 75 20 28 6d 65 6e 75 57 | 69 6e 64 2c 20 30 29 3b |u (menuW|ind, 0);|
|000008c0| 0d 09 0d 09 6d 65 6e 75 | 54 65 73 74 20 3d 20 4e |....menu|Test = N|
|000008d0| 65 77 4d 65 6e 75 28 4d | 74 65 73 74 2c 20 43 74 |ewMenu(M|test, Ct|
|000008e0| 6f 50 73 74 72 28 22 54 | 65 73 74 22 29 29 3b 0d |oPstr("T|est"));.|
|000008f0| 09 41 70 70 65 6e 64 4d | 65 6e 75 20 28 6d 65 6e |.AppendM|enu (men|
|00000900| 75 54 65 73 74 2c 20 0d | 09 09 43 74 6f 50 73 74 |uTest, .|..CtoPst|
|00000910| 72 28 22 50 69 63 6b 3b | 4f 6e 65 3b 4f 66 3b 54 |r("Pick;|One;Of;T|
|00000920| 68 65 73 65 22 29 29 3b | 0d 09 0d 09 44 72 61 77 |hese"));|....Draw|
|00000930| 4d 65 6e 75 42 61 72 28 | 29 3b 0d 7d 0d 09 0d 09 |MenuBar(|);.}....|
|00000940| 0d 2f 2a 09 45 76 65 6e | 74 20 4c 6f 6f 70 20 0d |./*.Even|t Loop .|
|00000950| 20 2a 09 09 4c 6f 6f 70 | 20 66 6f 72 65 76 65 72 | *..Loop| forever|
|00000960| 20 75 6e 74 69 6c 20 51 | 75 69 74 0d 20 2a 2f 0d | until Q|uit. */.|
|00000970| 65 76 65 6e 74 6c 6f 6f | 70 28 29 0d 7b 0d 09 45 |eventloo|p().{..E|
|00000980| 76 65 6e 74 52 65 63 6f | 72 64 09 09 74 68 65 45 |ventReco|rd..theE|
|00000990| 76 65 6e 74 3b 0d 09 63 | 68 61 72 09 09 09 09 63 |vent;..c|har....c|
|000009a0| 3b 0d 09 73 68 6f 72 74 | 09 09 09 09 77 69 6e 64 |;..short|....wind|
|000009b0| 6f 77 63 6f 64 65 3b 0d | 09 57 69 6e 64 6f 77 50 |owcode;.|.WindowP|
|000009c0| 74 72 09 09 77 77 3b 0d | 09 0d 09 77 68 69 6c 65 |tr..ww;.|...while|
|000009d0| 28 54 72 75 65 29 0d 09 | 09 7b 0d 09 09 69 66 20 |(True)..|.{...if |
|000009e0| 28 74 68 65 57 69 6e 64 | 6f 77 29 09 20 20 20 20 |(theWind|ow). |
|000009f0| 09 09 09 2f 2a 20 74 68 | 69 73 20 63 6f 64 65 20 |.../* th|is code |
|00000a00| 69 73 20 68 65 72 65 20 | 74 6f 20 2a 2f 0d 09 09 |is here |to */...|
|00000a10| 09 7b 09 09 09 09 09 09 | 09 09 2f 2a 20 70 72 65 |.{......|../* pre|
|00000a20| 76 65 6e 74 20 63 6c 6f | 73 69 6e 67 20 61 6e 20 |vent clo|sing an |
|00000a30| 2a 2f 0d 09 09 09 45 6e | 61 62 6c 65 49 74 65 6d |*/....En|ableItem|
|00000a40| 28 6d 65 6e 75 46 69 6c | 65 2c 32 29 3b 09 2f 2a |(menuFil|e,2);./*|
|00000a50| 20 61 6c 72 65 61 64 79 | 20 63 6c 6f 73 65 64 20 | already| closed |
|00000a60| 77 69 6e 64 6f 77 20 2a | 2f 0d 09 09 09 44 69 73 |window *|/....Dis|
|00000a70| 61 62 6c 65 49 74 65 6d | 28 6d 65 6e 75 46 69 6c |ableItem|(menuFil|
|00000a80| 65 2c 31 29 3b 0d 09 09 | 09 7d 0d 09 09 65 6c 73 |e,1);...|.}...els|
|00000a90| 65 09 09 09 09 09 09 09 | 09 0d 09 09 09 7b 09 09 |e.......|.....{..|
|00000aa0| 09 09 09 09 09 09 0d 09 | 09 09 45 6e 61 62 6c 65 |........|..Enable|
|00000ab0| 49 74 65 6d 28 6d 65 6e | 75 46 69 6c 65 2c 31 29 |Item(men|uFile,1)|
|00000ac0| 3b 0d 09 09 09 44 69 73 | 61 62 6c 65 49 74 65 6d |;....Dis|ableItem|
|00000ad0| 28 6d 65 6e 75 46 69 6c | 65 2c 32 29 3b 0d 09 09 |(menuFil|e,2);...|
|00000ae0| 09 7d 0d 09 09 09 0d 09 | 09 69 66 20 28 47 65 74 |.}......|.if (Get|
|00000af0| 4e 65 78 74 45 76 65 6e | 74 28 65 76 65 72 79 45 |NextEven|t(everyE|
|00000b00| 76 65 6e 74 2c 26 74 68 | 65 45 76 65 6e 74 29 29 |vent,&th|eEvent))|
|00000b10| 0d 09 09 09 73 77 69 74 | 63 68 28 74 68 65 45 76 |....swit|ch(theEv|
|00000b20| 65 6e 74 2e 77 68 61 74 | 29 09 09 09 09 09 0d 09 |ent.what|).......|
|00000b30| 09 09 09 7b 09 09 09 09 | 09 09 2f 2a 20 6f 6e 6c |...{....|../* onl|
|00000b40| 79 20 63 68 65 63 6b 20 | 6b 65 79 20 61 6e 64 20 |y check |key and |
|00000b50| 2a 2f 0d 09 09 09 09 63 | 61 73 65 20 6b 65 79 44 |*/.....c|ase keyD|
|00000b60| 6f 77 6e 3a 20 09 09 2f | 2a 20 6d 6f 75 73 65 20 |own: ../|* mouse |
|00000b70| 64 6f 77 6e 20 65 76 65 | 6e 74 73 20 2a 2f 0d 09 |down eve|nts */..|
|00000b80| 09 09 09 09 69 66 20 28 | 74 68 65 45 76 65 6e 74 |....if (|theEvent|
|00000b90| 2e 6d 6f 64 69 66 69 65 | 72 73 20 26 20 63 6d 64 |.modifie|rs & cmd|
|00000ba0| 4b 65 79 29 0d 09 09 09 | 09 09 09 7b 0d 09 09 09 |Key)....|...{....|
|00000bb0| 09 09 09 63 20 3d 20 74 | 68 65 45 76 65 6e 74 2e |...c = t|heEvent.|
|00000bc0| 6d 65 73 73 61 67 65 20 | 26 20 63 68 61 72 43 6f |message |& charCo|
|00000bd0| 64 65 4d 61 73 6b 3b 0d | 09 09 09 09 09 09 64 6f |deMask;.|......do|
|00000be0| 6d 65 6e 75 28 4d 65 6e | 75 4b 65 79 28 63 29 29 |menu(Men|uKey(c))|
|00000bf0| 3b 0d 09 09 09 09 09 09 | 7d 0d 09 09 09 09 09 62 |;.......|}......b|
|00000c00| 72 65 61 6b 3b 0d 09 09 | 09 09 63 61 73 65 20 6d |reak;...|..case m|
|00000c10| 6f 75 73 65 44 6f 77 6e | 3a 0d 09 09 09 09 09 64 |ouseDown|:......d|
|00000c20| 6f 6d 6f 75 73 65 28 26 | 74 68 65 45 76 65 6e 74 |omouse(&|theEvent|
|00000c30| 29 3b 0d 09 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |);......|break;..|
|00000c40| 09 09 09 64 65 66 61 75 | 6c 74 3a 0d 09 09 09 09 |...defau|lt:.....|
|00000c50| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 7d 0d 09 09 |.break;.|....}...|
|00000c60| 7d 0d 7d 0d 0d 0d 2f 2a | 20 64 6f 6d 6f 75 73 65 |}.}.../*| domouse|
|00000c70| 0d 20 2a 09 09 68 61 6e | 64 6c 65 20 6d 6f 75 73 |. *..han|dle mous|
|00000c80| 65 20 64 6f 77 6e 20 65 | 76 65 6e 74 73 0d 20 2a |e down e|vents. *|
|00000c90| 2f 0d 64 6f 6d 6f 75 73 | 65 28 65 72 29 0d 09 45 |/.domous|e(er)..E|
|00000ca0| 76 65 6e 74 52 65 63 6f | 72 64 09 2a 65 72 3b 0d |ventReco|rd.*er;.|
|00000cb0| 7b 0d 09 73 68 6f 72 74 | 09 09 09 77 69 6e 64 6f |{..short|...windo|
|00000cc0| 77 63 6f 64 65 3b 0d 09 | 57 69 6e 64 6f 77 50 74 |wcode;..|WindowPt|
|00000cd0| 72 09 77 68 69 63 68 57 | 69 6e 64 6f 77 3b 0d 09 |r.whichW|indow;..|
|00000ce0| 73 68 6f 72 74 09 09 09 | 69 6e 67 6f 3b 0d 09 6c |short...|ingo;..l|
|00000cf0| 6f 6e 67 09 09 09 73 69 | 7a 65 3b 0d 09 0d 09 77 |ong...si|ze;....w|
|00000d00| 69 6e 64 6f 77 63 6f 64 | 65 20 3d 20 46 69 6e 64 |indowcod|e = Find|
|00000d10| 57 69 6e 64 6f 77 28 65 | 72 2d 3e 77 68 65 72 65 |Window(e|r->where|
|00000d20| 2c 20 0d 09 09 09 09 09 | 09 09 09 09 26 77 68 69 |, ......|....&whi|
|00000d30| 63 68 57 69 6e 64 6f 77 | 29 3b 0d 09 73 77 69 74 |chWindow|);..swit|
|00000d40| 63 68 20 28 77 69 6e 64 | 6f 77 63 6f 64 65 29 0d |ch (wind|owcode).|
|00000d50| 09 09 7b 0d 09 09 63 61 | 73 65 20 69 6e 44 65 73 |..{...ca|se inDes|
|00000d60| 6b 3a 0d 09 09 09 69 66 | 20 28 74 68 65 57 69 6e |k:....if| (theWin|
|00000d70| 64 6f 77 20 6e 6f 74 65 | 71 75 61 6c 20 30 29 0d |dow note|qual 0).|
|00000d80| 09 09 09 09 7b 0d 09 09 | 09 09 48 69 6c 69 74 65 |....{...|..Hilite|
|00000d90| 57 69 6e 64 6f 77 28 74 | 68 65 57 69 6e 64 6f 77 |Window(t|heWindow|
|00000da0| 2c 20 46 61 6c 73 65 29 | 3b 0d 09 09 09 09 44 72 |, False)|;.....Dr|
|00000db0| 61 77 47 72 6f 77 49 63 | 6f 6e 28 74 68 65 57 69 |awGrowIc|on(theWi|
|00000dc0| 6e 64 6f 77 29 3b 0d 09 | 09 09 09 7d 0d 09 09 09 |ndow);..|...}....|
|00000dd0| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 69 6e |break;..|.case in|
|00000de0| 4d 65 6e 75 42 61 72 3a | 0d 09 09 09 64 6f 6d 65 |MenuBar:|....dome|
|00000df0| 6e 75 28 4d 65 6e 75 53 | 65 6c 65 63 74 28 65 72 |nu(MenuS|elect(er|
|00000e00| 2d 3e 77 68 65 72 65 29 | 29 3b 0d 09 09 09 62 72 |->where)|);....br|
|00000e10| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 69 6e 53 79 |eak;...c|ase inSy|
|00000e20| 73 57 69 6e 64 6f 77 3a | 0d 09 09 09 53 79 73 42 |sWindow:|....SysB|
|00000e30| 65 65 70 28 31 29 3b 0d | 09 09 09 62 72 65 61 6b |eep(1);.|...break|
|00000e40| 3b 0d 09 09 63 61 73 65 | 20 69 6e 43 6f 6e 74 65 |;...case| inConte|
|00000e50| 6e 74 3a 0d 09 09 09 48 | 69 6c 69 74 65 57 69 6e |nt:....H|iliteWin|
|00000e60| 64 6f 77 28 77 68 69 63 | 68 57 69 6e 64 6f 77 2c |dow(whic|hWindow,|
|00000e70| 54 72 75 65 29 3b 0d 09 | 09 09 44 72 61 77 47 72 |True);..|..DrawGr|
|00000e80| 6f 77 49 63 6f 6e 28 74 | 68 65 57 69 6e 64 6f 77 |owIcon(t|heWindow|
|00000e90| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |);....br|eak;...c|
|00000ea0| 61 73 65 20 69 6e 44 72 | 61 67 3a 0d 09 09 09 44 |ase inDr|ag:....D|
|00000eb0| 72 61 67 57 69 6e 64 6f | 77 28 77 68 69 63 68 57 |ragWindo|w(whichW|
|00000ec0| 69 6e 64 6f 77 2c 20 0d | 09 09 09 09 09 09 20 20 |indow, .|...... |
|00000ed0| 65 72 2d 3e 77 68 65 72 | 65 2c 20 26 64 72 61 67 |er->wher|e, &drag|
|00000ee0| 62 6f 75 6e 64 29 3b 0d | 09 09 09 44 72 61 77 47 |bound);.|...DrawG|
|00000ef0| 72 6f 77 49 63 6f 6e 28 | 74 68 65 57 69 6e 64 6f |rowIcon(|theWindo|
|00000f00| 77 29 3b 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |w);....b|reak;...|
|00000f10| 63 61 73 65 20 69 6e 47 | 72 6f 77 3a 0d 09 09 09 |case inG|row:....|
|00000f20| 2f 2a 20 6e 6f 74 20 69 | 6e 63 6c 75 64 65 64 20 |/* not i|ncluded |
|00000f30| 74 68 69 73 20 6d 6f 6e | 74 68 20 2a 2f 0d 09 09 |this mon|th */...|
|00000f40| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 69 |.break;.|..case i|
|00000f50| 6e 47 6f 41 77 61 79 3a | 0d 09 09 09 69 6e 67 6f |nGoAway:|....ingo|
|00000f60| 20 3d 20 54 72 61 63 6b | 47 6f 41 77 61 79 28 77 | = Track|GoAway(w|
|00000f70| 68 69 63 68 57 69 6e 64 | 6f 77 2c 65 72 2d 3e 77 |hichWind|ow,er->w|
|00000f80| 68 65 72 65 29 3b 0d 09 | 09 09 69 66 20 28 69 6e |here);..|..if (in|
|00000f90| 67 6f 29 0d 09 09 09 09 | 7b 0d 09 09 09 09 43 6c |go).....|{.....Cl|
|00000fa0| 6f 73 65 57 69 6e 64 6f | 77 28 77 68 69 63 68 57 |oseWindo|w(whichW|
|00000fb0| 69 6e 64 6f 77 29 3b 0d | 09 09 09 09 74 68 65 57 |indow);.|....theW|
|00000fc0| 69 6e 64 6f 77 20 3d 20 | 4e 69 6c 3b 0d 09 09 09 |indow = |Nil;....|
|00000fd0| 09 7d 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 7d |.}....br|eak;...}|
|00000fe0| 0d 7d 0d 0d 2f 2a 20 64 | 6f 6d 65 6e 75 0d 20 2a |.}../* d|omenu. *|
|00000ff0| 09 09 68 61 6e 64 6c 65 | 73 20 6d 65 6e 75 20 61 |..handle|s menu a|
|00001000| 63 74 69 76 69 74 79 0d | 20 2a 09 09 73 69 6d 70 |ctivity.| *..simp|
|00001010| 6c 79 20 61 20 64 69 73 | 70 61 74 63 68 65 72 20 |ly a dis|patcher |
|00001020| 66 6f 72 20 65 61 63 68 | 0d 20 2a 09 09 6d 65 6e |for each|. *..men|
|00001030| 75 2e 0d 20 2a 2f 0d 64 | 6f 6d 65 6e 75 28 6d 63 |u.. */.d|omenu(mc|
|00001040| 29 0d 09 6c 6f 6e 67 09 | 09 09 6d 63 3b 09 2f 2a |)..long.|..mc;./*|
|00001050| 20 6d 65 6e 75 20 72 65 | 73 75 6c 74 20 2a 2f 0d | menu re|sult */.|
|00001060| 7b 0d 09 73 68 6f 72 74 | 09 09 09 6d 65 6e 75 49 |{..short|...menuI|
|00001070| 64 3b 0d 09 73 68 6f 72 | 74 09 09 09 6d 65 6e 75 |d;..shor|t...menu|
|00001080| 69 74 65 6d 3b 0d 09 0d | 09 6d 65 6e 75 49 64 20 |item;...|.menuId |
|00001090| 3d 20 48 69 57 6f 72 64 | 28 6d 63 29 3b 0d 09 6d |= HiWord|(mc);..m|
|000010a0| 65 6e 75 69 74 65 6d 20 | 3d 20 4c 6f 57 6f 72 64 |enuitem |= LoWord|
|000010b0| 28 6d 63 29 3b 0d 09 0d | 09 73 77 69 74 63 68 20 |(mc);...|.switch |
|000010c0| 28 6d 65 6e 75 49 64 29 | 0d 09 09 7b 0d 09 09 63 |(menuId)|...{...c|
|000010d0| 61 73 65 20 4d 64 65 73 | 6b 20 3a 20 62 72 65 61 |ase Mdes|k : brea|
|000010e0| 6b 3b 0d 09 09 09 09 09 | 09 2f 2a 20 6e 6f 74 20 |k;......|./* not |
|000010f0| 68 61 6e 64 6c 69 6e 67 | 20 44 41 27 73 20 2a 2f |handling| DA's */|
|00001100| 0d 09 09 63 61 73 65 20 | 4d 66 69 6c 65 20 3a 20 |...case |Mfile : |
|00001110| 64 6f 66 69 6c 65 28 6d | 65 6e 75 69 74 65 6d 29 |dofile(m|enuitem)|
|00001120| 3b 0d 09 09 09 09 09 09 | 20 62 72 65 61 6b 3b 0d |;.......| break;.|
|00001130| 09 09 63 61 73 65 20 4d | 65 64 69 74 20 3a 20 62 |..case M|edit : b|
|00001140| 72 65 61 6b 3b 0d 09 09 | 0d 09 09 63 61 73 65 20 |reak;...|...case |
|00001150| 4d 77 69 6e 64 20 3a 20 | 64 6f 77 69 6e 64 28 6d |Mwind : |dowind(m|
|00001160| 65 6e 75 69 74 65 6d 29 | 3b 0d 09 09 09 09 09 09 |enuitem)|;.......|
|00001170| 20 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 4d | break;.|..case M|
|00001180| 74 65 73 74 20 3a 20 64 | 6f 74 65 73 74 28 6d 65 |test : d|otest(me|
|00001190| 6e 75 69 74 65 6d 29 3b | 0d 09 09 09 09 09 09 20 |nuitem);|....... |
|000011a0| 62 72 65 61 6b 3b 0d 09 | 09 7d 0d 09 48 69 6c 69 |break;..|.}..Hili|
|000011b0| 74 65 4d 65 6e 75 28 30 | 29 3b 0d 7d 0d 0d 2f 2a |teMenu(0|);.}../*|
|000011c0| 20 64 6f 66 69 6c 65 0d | 20 2a 09 09 68 61 6e 64 | dofile.| *..hand|
|000011d0| 6c 65 73 20 66 69 6c 65 | 20 6d 65 6e 75 0d 20 2a |les file| menu. *|
|000011e0| 2f 0d 64 6f 66 69 6c 65 | 28 69 74 65 6d 29 0d 09 |/.dofile|(item)..|
|000011f0| 73 68 6f 72 74 09 09 69 | 74 65 6d 3b 0d 7b 0d 09 |short..i|tem;.{..|
|00001200| 63 68 61 72 09 09 2a 74 | 69 74 6c 65 31 3b 09 09 |char..*t|itle1;..|
|00001210| 09 2f 2a 20 66 69 72 73 | 74 20 74 69 74 6c 65 20 |./* firs|t title |
|00001220| 66 6f 72 20 77 69 6e 64 | 6f 77 20 2a 2f 0d 09 52 |for wind|ow */..R|
|00001230| 65 63 74 09 09 62 6f 75 | 6e 64 73 52 65 63 74 3b |ect..bou|ndsRect;|
|00001240| 0d 09 0d 09 73 77 69 74 | 63 68 20 28 69 74 65 6d |....swit|ch (item|
|00001250| 29 0d 09 09 7b 0d 09 09 | 63 61 73 65 20 31 20 3a |)...{...|case 1 :|
|00001260| 09 09 2f 2a 20 6f 70 65 | 6e 20 74 68 65 20 77 69 |../* ope|n the wi|
|00001270| 6e 64 6f 77 20 2a 2f 0d | 09 09 09 74 69 74 6c 65 |ndow */.|...title|
|00001280| 31 20 3d 20 22 41 42 43 | 20 57 69 6e 64 6f 77 22 |1 = "ABC| Window"|
|00001290| 3b 0d 09 09 09 53 65 74 | 52 65 63 74 28 26 62 6f |;....Set|Rect(&bo|
|000012a0| 75 6e 64 73 52 65 63 74 | 2c 35 30 2c 35 30 2c 33 |undsRect|,50,50,3|
|000012b0| 30 30 2c 31 35 30 29 3b | 0d 09 09 09 74 68 65 57 |00,150);|....theW|
|000012c0| 69 6e 64 6f 77 20 3d 20 | 4e 65 77 57 69 6e 64 6f |indow = |NewWindo|
|000012d0| 77 28 26 77 69 6e 64 6f | 77 52 65 63 2c 20 26 62 |w(&windo|wRec, &b|
|000012e0| 6f 75 6e 64 73 52 65 63 | 74 2c 0d 09 09 09 09 09 |oundsRec|t,......|
|000012f0| 09 09 43 74 6f 50 73 74 | 72 28 74 69 74 6c 65 31 |..CtoPst|r(title1|
|00001300| 29 2c 54 72 75 65 2c 64 | 6f 63 75 6d 65 6e 74 50 |),True,d|ocumentP|
|00001310| 72 6f 63 2c 0d 09 09 09 | 09 09 09 09 28 57 69 6e |roc,....|....(Win|
|00001320| 64 6f 77 50 74 72 29 20 | 2d 31 2c 20 54 72 75 65 |dowPtr) |-1, True|
|00001330| 2c 20 30 29 3b 0d 09 09 | 09 44 72 61 77 47 72 6f |, 0);...|.DrawGro|
|00001340| 77 49 63 6f 6e 28 74 68 | 65 57 69 6e 64 6f 77 29 |wIcon(th|eWindow)|
|00001350| 3b 0d 09 09 09 50 74 6f | 43 73 74 72 28 74 69 74 |;....Pto|Cstr(tit|
|00001360| 6c 65 31 29 3b 0d 09 09 | 09 44 69 73 61 62 6c 65 |le1);...|.Disable|
|00001370| 49 74 65 6d 28 6d 65 6e | 75 46 69 6c 65 2c 31 29 |Item(men|uFile,1)|
|00001380| 3b 0d 09 09 09 45 6e 61 | 62 6c 65 49 74 65 6d 28 |;....Ena|bleItem(|
|00001390| 6d 65 6e 75 46 69 6c 65 | 2c 32 29 3b 0d 09 09 09 |menuFile|,2);....|
|000013a0| 62 72 65 61 6b 3b 0d 09 | 09 0d 09 09 63 61 73 65 |break;..|....case|
|000013b0| 20 32 20 3a 09 09 2f 2a | 20 63 6c 6f 73 65 20 74 | 2 :../*| close t|
|000013c0| 68 65 20 77 69 6e 64 6f | 77 20 2a 2f 0d 09 09 09 |he windo|w */....|
|000013d0| 43 6c 6f 73 65 57 69 6e | 64 6f 77 28 74 68 65 57 |CloseWin|dow(theW|
|000013e0| 69 6e 64 6f 77 29 3b 0d | 09 09 09 74 68 65 57 69 |indow);.|...theWi|
|000013f0| 6e 64 6f 77 20 3d 20 4e | 69 6c 3b 0d 09 09 09 44 |ndow = N|il;....D|
|00001400| 69 73 61 62 6c 65 49 74 | 65 6d 28 6d 65 6e 75 46 |isableIt|em(menuF|
|00001410| 69 6c 65 2c 32 29 3b 0d | 09 09 09 45 6e 61 62 6c |ile,2);.|...Enabl|
|00001420| 65 49 74 65 6d 28 6d 65 | 6e 75 46 69 6c 65 2c 31 |eItem(me|nuFile,1|
|00001430| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 0d |);....br|eak;....|
|00001440| 09 09 63 61 73 65 20 33 | 20 3a 09 09 2f 2a 20 51 |..case 3| :../* Q|
|00001450| 75 69 74 20 2a 2f 0d 09 | 09 09 45 78 69 74 54 6f |uit */..|..ExitTo|
|00001460| 53 68 65 6c 6c 28 29 3b | 0d 09 09 09 62 72 65 61 |Shell();|....brea|
|00001470| 6b 3b 0d 09 09 09 0d 09 | 09 63 61 73 65 20 35 20 |k;......|.case 5 |
|00001480| 3a 09 09 2f 2a 20 49 6e | 73 74 61 6c 6c 20 61 64 |:../* In|stall ad|
|00001490| 64 69 74 69 6f 6e 61 6c | 20 6d 65 6e 75 20 2a 2f |ditional| menu */|
|000014a0| 0d 09 09 09 49 6e 73 65 | 72 74 4d 65 6e 75 28 6d |....Inse|rtMenu(m|
|000014b0| 65 6e 75 54 65 73 74 2c | 30 29 3b 0d 09 09 09 45 |enuTest,|0);....E|
|000014c0| 6e 61 62 6c 65 49 74 65 | 6d 28 6d 65 6e 75 46 69 |nableIte|m(menuFi|
|000014d0| 6c 65 2c 36 29 3b 0d 09 | 09 09 44 69 73 61 62 6c |le,6);..|..Disabl|
|000014e0| 65 49 74 65 6d 28 6d 65 | 6e 75 46 69 6c 65 2c 35 |eItem(me|nuFile,5|
|000014f0| 29 3b 0d 09 09 09 44 72 | 61 77 4d 65 6e 75 42 61 |);....Dr|awMenuBa|
|00001500| 72 28 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |r();....|break;..|
|00001510| 09 09 0d 09 09 63 61 73 | 65 20 36 20 3a 09 09 2f |.....cas|e 6 :../|
|00001520| 2a 20 72 65 6d 6f 76 65 | 20 61 64 64 69 74 69 6f |* remove| additio|
|00001530| 6e 61 6c 20 6d 65 6e 75 | 20 2a 2f 0d 09 09 09 44 |nal menu| */....D|
|00001540| 65 6c 65 74 65 4d 65 6e | 75 28 4d 74 65 73 74 29 |eleteMen|u(Mtest)|
|00001550| 3b 0d 09 09 09 45 6e 61 | 62 6c 65 49 74 65 6d 28 |;....Ena|bleItem(|
|00001560| 6d 65 6e 75 46 69 6c 65 | 2c 35 29 3b 0d 09 09 09 |menuFile|,5);....|
|00001570| 44 69 73 61 62 6c 65 49 | 74 65 6d 28 6d 65 6e 75 |DisableI|tem(menu|
|00001580| 46 69 6c 65 2c 36 29 3b | 0d 09 09 09 44 72 61 77 |File,6);|....Draw|
|00001590| 4d 65 6e 75 42 61 72 28 | 29 3b 0d 09 09 09 62 72 |MenuBar(|);....br|
|000015a0| 65 61 6b 3b 0d 09 09 0d | 09 09 7d 0d 7d 0d 0d 2f |eak;....|..}.}../|
|000015b0| 2a 0d 20 2a 09 64 6f 77 | 69 6e 64 0d 20 2a 09 09 |*. *.dow|ind. *..|
|000015c0| 68 61 6e 64 6c 65 73 20 | 77 69 6e 64 6f 77 20 6d |handles |window m|
|000015d0| 65 6e 75 20 0d 20 2a 09 | 09 4e 6f 74 65 20 74 68 |enu . *.|.Note th|
|000015e0| 61 74 20 65 61 63 68 20 | 63 61 73 65 20 63 6f 6e |at each |case con|
|000015f0| 74 61 69 6e 73 20 61 6e | 0d 20 2a 09 09 69 66 20 |tains an|. *..if |
|00001600| 74 65 73 74 69 6e 67 20 | 74 68 65 20 65 78 69 73 |testing |the exis|
|00001610| 74 61 6e 63 65 20 6f 66 | 20 74 68 65 0d 20 2a 09 |tance of| the. *.|
|00001620| 09 77 69 6e 64 6f 77 2e | 20 20 54 68 69 73 20 63 |.window.| This c|
|00001630| 6f 75 6c 64 20 62 65 20 | 77 72 69 74 74 65 6e 0d |ould be |written.|
|00001640| 20 2a 09 09 77 69 74 68 | 20 6f 6e 65 20 69 66 20 | *..with| one if |
|00001650| 62 65 66 6f 72 65 20 74 | 68 65 20 73 77 69 74 63 |before t|he switc|
|00001660| 68 2e 0d 20 2a 2f 0d 64 | 6f 77 69 6e 64 28 69 74 |h.. */.d|owind(it|
|00001670| 65 6d 29 0d 09 73 68 6f | 72 74 09 09 69 74 65 6d |em)..sho|rt..item|
|00001680| 3b 0d 7b 0d 09 63 68 61 | 72 09 09 2a 74 69 74 6c |;.{..cha|r..*titl|
|00001690| 65 32 3b 09 09 09 2f 2a | 20 73 65 63 6f 6e 64 20 |e2;.../*| second |
|000016a0| 74 69 74 6c 65 20 66 6f | 72 20 77 69 6e 64 6f 77 |title fo|r window|
|000016b0| 20 2a 2f 0d 09 0d 09 73 | 77 69 74 63 68 20 28 69 | */....s|witch (i|
|000016c0| 74 65 6d 29 0d 09 09 7b | 0d 09 09 63 61 73 65 20 |tem)...{|...case |
|000016d0| 31 20 3a 09 2f 2a 20 48 | 69 64 65 20 2a 2f 0d 09 |1 :./* H|ide */..|
|000016e0| 09 09 69 66 20 28 74 68 | 65 57 69 6e 64 6f 77 29 |..if (th|eWindow)|
|000016f0| 0d 09 09 09 09 48 69 64 | 65 57 69 6e 64 6f 77 28 |.....Hid|eWindow(|
|00001700| 74 68 65 57 69 6e 64 6f | 77 29 3b 0d 09 09 09 62 |theWindo|w);....b|
|00001710| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 32 20 3a |reak;...|case 2 :|
|00001720| 09 2f 2a 20 53 68 6f 77 | 20 2a 2f 0d 09 09 09 69 |./* Show| */....i|
|00001730| 66 20 28 74 68 65 57 69 | 6e 64 6f 77 29 0d 09 09 |f (theWi|ndow)...|
|00001740| 09 09 53 68 6f 77 57 69 | 6e 64 6f 77 28 74 68 65 |..ShowWi|ndow(the|
|00001750| 57 69 6e 64 6f 77 29 3b | 0d 09 09 09 62 72 65 61 |Window);|....brea|
|00001760| 6b 3b 0d 09 09 63 61 73 | 65 20 33 20 3a 09 2f 2a |k;...cas|e 3 :./*|
|00001770| 20 43 68 61 6e 67 65 20 | 74 69 74 6c 65 20 2a 2f | Change |title */|
|00001780| 0d 09 09 09 69 66 20 28 | 74 68 65 57 69 6e 64 6f |....if (|theWindo|
|00001790| 77 29 0d 09 09 09 09 7b | 0d 09 09 09 09 74 69 74 |w).....{|.....tit|
|000017a0| 6c 65 32 20 3d 20 22 41 | 20 44 69 66 66 65 72 65 |le2 = "A| Differe|
|000017b0| 6e 74 20 54 69 74 6c 65 | 22 3b 0d 09 09 09 09 53 |nt Title|";.....S|
|000017c0| 65 74 57 54 69 74 6c 65 | 28 74 68 65 57 69 6e 64 |etWTitle|(theWind|
|000017d0| 6f 77 2c 20 43 74 6f 50 | 73 74 72 28 74 69 74 6c |ow, CtoP|str(titl|
|000017e0| 65 32 29 29 3b 0d 09 09 | 09 09 50 74 6f 43 73 74 |e2));...|..PtoCst|
|000017f0| 72 28 74 69 74 6c 65 32 | 29 3b 0d 09 09 09 09 7d |r(title2|);.....}|
|00001800| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 7d 0d 7d |....brea|k;...}.}|
|00001810| 0d 0d 2f 2a 09 64 6f 74 | 65 73 74 0d 20 2a 09 09 |../*.dot|est. *..|
|00001820| 48 61 6e 64 6c 65 73 20 | 6e 65 77 20 6d 65 6e 75 |Handles |new menu|
|00001830| 2e 0d 20 2a 09 09 41 6c | 6c 20 74 68 69 73 20 64 |.. *..Al|l this d|
|00001840| 6f 65 73 20 69 73 20 6d | 61 72 6b 20 6d 65 6e 75 |oes is m|ark menu|
|00001850| 0d 20 2a 09 09 69 74 65 | 6d 73 20 69 66 20 74 68 |. *..ite|ms if th|
|00001860| 65 79 20 61 72 65 20 6e | 6f 74 20 6d 61 72 6b 65 |ey are n|ot marke|
|00001870| 64 20 61 6e 64 0d 20 2a | 20 09 75 6e 6d 61 72 6b |d and. *| .unmark|
|00001880| 20 74 68 65 6d 20 69 66 | 20 74 68 65 79 20 61 72 | them if| they ar|
|00001890| 65 2e 0d 20 2a 2f 0d 64 | 6f 74 65 73 74 28 69 74 |e.. */.d|otest(it|
|000018a0| 65 6d 29 0d 09 73 68 6f | 72 74 09 09 69 74 65 6d |em)..sho|rt..item|
|000018b0| 3b 0d 7b 0d 09 73 68 6f | 72 74 09 09 6d 61 72 6b |;.{..sho|rt..mark|
|000018c0| 3b 0d 09 0d 09 47 65 74 | 49 74 65 6d 4d 61 72 6b |;....Get|ItemMark|
|000018d0| 28 6d 65 6e 75 54 65 73 | 74 2c 69 74 65 6d 2c 26 |(menuTes|t,item,&|
|000018e0| 6d 61 72 6b 29 3b 0d 09 | 69 66 20 28 6d 61 72 6b |mark);..|if (mark|
|000018f0| 29 0d 09 09 43 68 65 63 | 6b 49 74 65 6d 28 6d 65 |)...Chec|kItem(me|
|00001900| 6e 75 54 65 73 74 2c 69 | 74 65 6d 2c 46 61 6c 73 |nuTest,i|tem,Fals|
|00001910| 65 29 3b 0d 09 65 6c 73 | 65 0d 09 09 43 68 65 63 |e);..els|e...Chec|
|00001920| 6b 49 74 65 6d 28 6d 65 | 6e 75 54 65 73 74 2c 69 |kItem(me|nuTest,i|
|00001930| 74 65 6d 2c 54 72 75 65 | 29 3b 0d 7d 0d 00 00 00 |tem,True|);.}....|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 01 00 00 00 01 16 | 00 00 00 16 00 00 00 46 |........|.......F|
|00001990| 18 f0 4e 5e 4e 75 c3 4f | 50 59 44 41 43 43 00 00 |..N^Nu.O|PYDACC..|
|000019a0| 4e 56 00 00 42 80 30 2e | 00 08 c0 bc 00 00 7f 80 |NV..B.0.|........|
|000019b0| 06 6d 65 6e 75 2e 63 6d | 02 00 00 00 54 45 58 54 |.menu.cm|....TEXT|
|000019c0| 4b 41 48 4c 01 00 00 00 | 00 80 00 00 00 01 ac 8d |KAHL....|........|
|000019d0| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 00 00 80 |..TEXTKA|HL......|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 9a fb 1c d6 00 00 | 18 bd 00 00 01 5c 30 2e |........|.....\0.|
|00001a00| 00 0a ef 40 32 2e 00 08 | d2 40 3d 41 00 0c 4e 5e |...@2...|.@=A..N^|
|00001a10| 2e 9f 4e 75 c6 4f 4e 54 | 49 44 20 20 00 00 4e 56 |..Nu.ONT|ID ..NV|
|00001a20| ff a6 48 e7 03 00 20 6e | 00 08 43 ee ff d6 70 0a |..H... n|..C...p.|
|00001a30| 22 d8 53 40 6e fa 32 90 | 42 46 70 00 72 00 14 36 |".S@n.2.|BFp.r..6|
|00001a40| 10 d6 02 42 00 ff 57 42 | 45 bc 00 ff 1d 82 00 d6 |...B..WB|E.......|
|00001a50| 20 6e 00 0c 20 50 3d 68 | 00 5a ff a6 7e 01 60 50 | n.. P=h|.Z..~.`P|
|00001a60| 20 6e 00 0c 20 50 30 07 | 53 40 41 bc 00 c7 20 07 | n.. P0.|S@A... .|
|00001a70| ed 40 43 ee ff a8 41 f0 | 00 34 70 0a 22 d8 53 40 |.@C...A.|.4p.".S@|
|00001a80| 00 00 00 04 00 06 00 03 | 00 00 00 0a 00 09 06 4d |........|.......M|
|00001a90| 6f 6e 61 63 6f 20 00 00 | 01 00 00 00 01 16 00 00 |onaco ..|........|
|00001aa0| 00 16 00 00 00 46 00 02 | a4 08 00 5c 00 00 00 1c |.....F..|...\....|
|00001ab0| 00 46 00 01 45 54 41 42 | 00 00 00 12 45 46 4e 54 |.F..ETAB|....EFNT|
|00001ac0| 00 00 00 1e 03 ec ff ff | 00 00 00 00 00 02 a3 74 |........|.......t|
|00001ad0| 03 eb ff ff 00 00 00 08 | 00 02 a3 80 00 00 00 00 |........|........|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+